package com.jerry.mingxing.ui.fashion;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


import java.util.List;

/**
 * Created by Administrator on 2016/8/31.
 */
public class FashionAdapter extends FragmentPagerAdapter {
    private List<Fragment> totalist;

    private String [] titlelist;

    public FashionAdapter(FragmentManager fm, List<Fragment> totalist, String [] titlelist) {
        super(fm);
        this.totalist = totalist;
        this.titlelist= titlelist;

    }

    @Override
    public Fragment getItem(int position) {
        return totalist.get(position);
    }

    @Override
    public int getCount() {
        return totalist.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titlelist[position&titlelist.length];
    }

}
